package com.chennan.excelpoi;

import com.alibaba.excel.EasyExcel;
import com.chennan.book.domain.imports.AnhFeiSuiImport;
import com.chennan.excelpoi.model.CardData;
import com.chennan.excelpoi.service.CardImportService;
import com.chennan.excelpoi.service.impl.CardImportServiceImpl;

/**
 * @author chennan
 * @create 2022-09
 */
public class TestMain {

    public static void main(String[] args) {
        String path ="D:\\Work\\aliyunJenkins\\Book\\处置收入23年8月18日日以来缴费明细.xlsx";

        CardImportService cardImportService = new CardImportServiceImpl();
        //读第一个页签数据
//        EasyExcel.read(path, CardData.class, new CardImport(cardImportService)).sheet().doRead();
        //读全部页签数据
//        EasyExcel.read(path, CardData.class, new CardImport(cardImportService)).doReadAll();
        //使用map 进行接数
        long sta = System.currentTimeMillis();
        EasyExcel.read(path, new AnhFeiSuiImport(cardImportService)).doReadAll();
        long end = System.currentTimeMillis();
        System.out.println("读取用时"+(end-sta));
    }
}
